<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
</head>
<body>
	<h1>欢迎登陆界面</h1>
	<form action="/ServletTest2/JudgeLoginInfoServlet">
		用户名: <input type="text" name="username"
			style="width: 100px; height: 25px;" /> <br /> 密&nbsp;码: <input
			type="password" name="password" style="width: 100px; height: 25px;" />
		<br /> 验证码:<input type="text" name="verify"
			style="width: 100px; height: 25px;" /> <img alt="verify" border="3px" 
			src="/loginVerifyImage/VerifyImageServlet" /> <br /> <input
			type="submit" value="登陆" name="loginButt" /> <input type="submit"
			value="注册" name="registButt" /><br />
		<%
		    String resultString = (String) session.getAttribute("result");
		    String printStr = "";
		    if (resultString != null) {
		        if (resultString.equals("error")) {
		            printStr = "密码或用户名错误";
		        } else if (resultString.equals("verifyerror")) {
		            printStr = "验证码错误";
		        } else {
		            printStr = "未知错误";
		        }
		    }
		%>
		<b><%=printStr%></b>

	</form>

</body>
</html>